<template>
  <div class="task-order">
    <!-- <el-table :data="task.order_list">
      <el-table-column label="平台" prop=""></el-table-column>
      <el-table-column label="预约盘口" prop=""></el-table-column>
      <el-table-column label="最小赔率" prop=""></el-table-column>
      <el-table-column label="最大赔率" prop=""></el-table-column>
      <el-table-column label="预约金额" prop=""></el-table-column>
      <el-table-column label="预约时间" prop=""></el-table-column>
      <el-table-column label="订单状态" prop=""></el-table-column>
      <el-table-column label="下单盘口" prop=""></el-table-column>
      <el-table-column label="下单赔率" prop=""></el-table-column>
      <el-table-column label="下单虚数金额" prop=""></el-table-column>
      <el-table-column label="下单时间" prop=""></el-table-column>
      <el-table-column label="下单账号" prop=""></el-table-column>
      <el-table-column label="订单号" prop=""></el-table-column>
    </el-table> -->

    <table>
      <thead>
        <th>平台</th>
        <th>订单状态</th>
        <th>下单盘口</th>
        <th>下单赔率</th>
        <th>下单金额</th>
        <th>下单虚数金额</th>
        <th>下单时间</th>
        <th>下单账号</th>
        <th>订单号</th>
      </thead>
      <tbody>
        <tr v-if="task.order_list.length == 0">
          <td colspan="14">暂无数据</td>
        </tr>
        <tr v-for="(item, index) in task.order_list" :key="index">
          <td>
            <div class="platform">
              {{ platformObj[item.bc_type]?.name || item.bc_type }}
            </div>
          </td>
          <td>
            <app-text v-if="item.place_status == 0">准备下单</app-text>
            <app-text v-else-if="item.place_status == 1">正在下单</app-text>
            <app-text v-else-if="item.place_status == 2" type="green">下单成功</app-text>
            <app-text v-else-if="item.place_status == 3" type="red">下单失败</app-text>
          </td>
          <!-- item.pk_odds_key -->
          <td style="display: flex;flex-direction: column;">
            <div style="height: 18px;">{{ item.place_pk_info_ch }}</div>
            <!-- {{item.score.score}} -->
            <div style="height: 18px;">{{item.score.score == '' || item.score.score == null ? '-' : item.score.score}}</div>
          </td>
          <td>
            {{ item.place_odds_info }}
          </td>
          <td>
            {{ item.total_amount }}
          </td>
          <td>
            {{ item.real_amount }}
          </td>
          <td>
            {{ item.created_at }}
          </td>
          <td>
            {{ item.user_name }}
          </td>
          <td>
            {{ item.id }}
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</template>
<script setup>
const { platformObj } = inject('/home')
const { store } = inject('/home')

const props = defineProps({
  task: Object,
})
</script>
<style lang="scss" scoped>
.task-order {
  background-color: #fff;
  padding: 8px;
  margin: 0 8px;
  border-radius: 8px;
}
table {
  width: 100%;
  text-align: center;
  font-size: 12px;
}

th {
  font-weight: inherit;
  line-height: 28px;
  color: #778090;
}

td {
  line-height: 28px;
  color: #252a30;
}

.status {
  color: #f1b31d;
}

.platform {
  display: flex;
  align-items: center;
  justify-content: center;
  img {
    margin-right: 8px;
    width: 16px;
    height: 16px;
  }
}
</style>
